//
//  MSalemanModel.m
//  NeusoftHBSJSober
//
//  Created by Apple-21 on 15/11/11.
//  Copyright (c) 2015年 com.neusoftsober. All rights reserved.
//

#import "MSalemanModel.h"

@implementation MSalemanModel

@end
@implementation MSalemanHttpResult

- (id)getSalemanInfomationWithJson:(id)JSON {

    if ([JSON isKindOfClass:[NSDictionary class]] && JSON) {
        
        MSalemanModel *model = [[MSalemanModel alloc]init];
        model.companyAddress = (JSON[@"CompanyAddress"] == [NSNull null]) ? @"" :JSON[@"CompanyAddress"];
        model.companyName = (JSON[@"CompanyName"] == [NSNull null]) ? @"" :JSON[@"CompanyName"];
        NSString *string = [JSON[@"EndDate"] stringByReplacingOccurrencesOfString:@"T" withString:@""];
        NSString *string2 = [string substringToIndex:18];
        model.endDate = string2;
        model.fee = [((NSNumber *)JSON[@"Fee"]) stringValue];
        model.getTicketMemo = (JSON[@"GetTicketMemo"] == [NSNull null]) ? @"" :JSON[@"GetTicketMemo"];
        model.getTicketMoney = [((NSNumber *)JSON[@"GetTicketMoney"]) stringValue];
        model.Money = [((NSNumber *)JSON[@"Money"]) stringValue];
        model.phone = (JSON[@"Phone"] == [NSNull null]) ? @"" :JSON[@"Phone"];
        model.salemanUserID = [((NSNumber *)JSON[@"SaleManUserID"]) stringValue];
        return model;
    }
    return nil;
}

@end